<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>老猫系统</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/js/jquery.js"></script>
    <style>


        #cate {
            width: 99%;
            margin: 0 auto;
            position: relative; overflow: hidden;
            padding-bottom: 40px;
        }

        #cate .item {
            width: 24%;
            height: 100px;
            margin-top: 10px;
            float: left;
            text-align: center;
            line-height: 36px;
        }

        #cate .item .img {
            margin: 0 auto;
            height: 80px;
            position: relative;
            overflow: hidden;
        }

        #cate .item .img img {
            width: 90%;
        }


        #gods{position: relative; overflow: hidden;}
        #gods .itm{float: left;width: 32%;height: 160px; margin-left: 1%; margin-top: 10px;}
        #gods .itm .pic{width: 95%; height: 100px;}
        #gods .itm .pic img{width: 100%; max-height: 100px;}
        #gods .itm .tit{color: #222;}
        #gods .itm .price{font-weight: bold; color: #ff5500;}


    </style>
    <link href="/css/com.css" type="text/css" rel="stylesheet">
</head>
<body>
<div id="top">老猫商城</div>
<div id="notice">
    <div class="horn"><img src="/img/honr.png"></div>
    <div class="notxt">
        <marquee>欢迎大家光临老猫商城，今全场5折。欢迎大家光临老猫商城，今全场5折</marquee>
    </div>
</div>
<div id="cate">
    {volist name="catelist" id="c" offset='0' length='8'}
    <div class="item">
        <div class="img">
            {if $c.href==''}
            <a href="{:url('cateDetail',['id'=>$c.id,'name'=>$c.name])}"><img src="{if $c.pic neq ''}/uploads/{$c.pic}{else}/img/default.png{/if}"/></a>
            {else}
            <a href="{$c.href}"><img src="{if $c.pic neq ''}/uploads/{$c.pic}{else}/img/default.png{/if}"/></a>
            {/if}
        </div>
        <span>
            {if $c.href==''}
            <a href="{:url('cateDetail',['id'=>$c.id,'name'=>$c.name])}">{$c.name}</a>
            {else}
            <a href="{$c.href}">{$c.name}</a>
            {/if}
        </span>
    </div>
    {/volist}

</div>

<div id="search">
    <div class="horn"><img src="/img/search.png"></div>
    <div class="notxt">
        <input type="text" name="search" placeholder="下单时间：9：30-10:30" autocomplete="off" class="layui-input">
    </div>
</div>
<div id="gods">
    {volist name='list' id='g'}
    <div class="itm">
        <div class="pic"><a href="{:url('goodsDetail',['id'=>$g.goods_id])}"><img src="<?php
             $pics=$g['pics'];
             $pic=explode(',',$pics);
             $f=true;
             for($i=0;$i<count($pic);$i++){
                if($pic[$i]!=''){
                    echo "/uploads/".$pic[$i];
                    $f=false;
                    break;
                }
             }
             if($f){
                echo "/img/default.png";
            }
            ?>"/></a></div>
        <div class="tit">{$g.goods_title}</div>
        <div class="price">￥ {$g.goods_price}</div>
    </div>
    {/volist}
</div>



{include file="bottom"}
</body>
</html>